<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.net.http.HttpPost</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.net.http.HttpPost");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791">tango.net.http.HttpPost</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: January 2006<br><br>
<b>author:</b><br>Kris<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L37">HttpPost</a></span>
<script>explorer.outline.addDecl('HttpPost');</script> : HttpClient;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Supports the basic needs of a client sending POST requests to a
        HTTP server. The following is a usage example:</font><br><br>
<font color="black"><pre class="d_code">

        <span class="lc">// open a web-page for posting (see HttpGet for simple reading)</span>
        <span class="k">auto</span> <span class="i">post</span> = <span class="k">new</span> <span class="i">HttpPost</span> (<span class="sl">"http://yourhost/yourpath"</span>);

        <span class="lc">// send, retrieve and display response</span>
        <span class="i">Cout</span> (<span class="k">cast</span>(<span class="k">char</span>[]) <span class="i">post</span>.<span class="i">write</span>(<span class="sl">"posted data"</span>, <span class="sl">"text/plain"</span>));
        
</pre><br><br></font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L49">this</a></span>
<script>explorer.outline.addDecl('this');</script>(char[] <span class="funcparam">url</span>, uint <span class="funcparam">pageChunk</span> = 16 * 1024);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a client for the given URL. The argument should be
                fully qualified with an "http:" or "https:" scheme, or an
                explicit port should be provided.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L62">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Uri <span class="funcparam">uri</span>, uint <span class="funcparam">pageChunk</span> = 16 * 1024);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a client with the provided Uri instance. The Uri should 
                be fully qualified with an "http:" or "https:" scheme, or an
                explicit port should be provided. </font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L74">write</a></span>
<script>explorer.outline.addDecl('write');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Send query params only</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L87">write</a></span>
<script>explorer.outline.addDecl('write');</script>(void[] <span class="funcparam">content</span>, char[] <span class="funcparam">type</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Send content and no query params. The contentLength header
                will be set to match the provided content, and contentType
                set to the given type.</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void[] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/net/http/HttpPost.d?rev=3791#L105">write</a></span>
<script>explorer.outline.addDecl('write');</script>(Pump <span class="funcparam">pump</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Send raw data via the provided pump, and no query 
                params. You have full control over headers and so 
                on via this method.</font><br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sat Aug  2 16:08:35 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>